<template>
  <el-dialog title="冻结理由" :visible.sync="show" width="25%">
    <div class="mb-10">{{ auditInfo.reason }}</div>
    <div class="handel flex justify-between">
      <p>冻结时间：{{ auditInfo.updatedTime }}</p>
      <p>操作人：{{ auditInfo.createdUser }}</p>
    </div>
  </el-dialog>
</template>

<script>
/**
 * 企业主列表查看冻结理由弹窗子组件
 * @property {Boolean} value 控制弹窗显示
 * @property {Number | String} id 企业主id
 */
export default {
  name: 'CompanyReasonDiaLog',
  components: {},
  props: {
    // 是否显示
    value: {
      type: Boolean,
      default: false
    },
    // 企业主id
    id: {
      type: [Number, String]
    }
  },
  data() {
    return {
      // 审核信息
      auditInfo: {
        // 操作人员
        createdUser: '',
        // 审核理由
        reason: '',
        // 修改时间
        updatedTime: ''
      }
    }
  },
  computed: {
    // 控制对话框显示
    show: {
      get() {
        return this.value
      },
      set(value) {
        this.$emit('input', value)
      }
    }
  },
  watch: {},
  created() {},
  updated() {},
  mounted() {},
  methods: {
    // 查看冻结理由
    async getReason(id) {
      try {
        const { data } = await this.$http.user.company.getVerifyStatus(id)
        this.auditInfo = { ...data }
      } catch (error) {
        console.log('getReason', error)
      }
    }
  }
}
</script>

<style lang="scss" scoped>
::v-deep.el-dialog__body {
  padding: 20px;
}
::v-deep.el-dialog__header {
  padding-bottom: 0;
}
.handel {
  padding-top: 10px;
  border-top: 1px solid #ddd;
}
</style>
